package com.software;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class HibernateUtils {
    private static final Configuration cfg;
    private static final SessionFactory sessionFactory;
    static {
        cfg = new Configuration();
        cfg.configure();
        sessionFactory = cfg.buildSessionFactory();
    }
    public static Session getSession() {
        return sessionFactory.openSession();
    }
}
